﻿@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    var keyValue = $.request("keyValue");
    $(function () {
        //initControl();

        $.ajax({
            url: "/SiteManage/Photos/GetFormJson",
            data: { keyValue: keyValue },
            dataType: "json",
            async: false,
            success: function (data) {
                if (data.path) {
                        data.path = 'http://storage.yunspace.com.cn/' + data.path
                }
                $("#form1").formSerialize(data);
                $("#form1").find('.form-control,select,input').attr('readonly', 'readonly');
                $("#form1").find('div.ckbox label').attr('for', '');
            }
        });
    });
    //function initControl() {
        //$("#F_Location").select2({ minimumResultsForSearch: -1 })
        //$("#F_ParentId").bindSelect({
        //    url: "/SystemManage/ModuleButton/GetTreeSelectJson",
        //    param: { moduleId: moduleId },
        //});
    //}
</script>

<form id="form1">
    <div style="padding-top: 20px; margin-right: 20px;">
        <table class="form">
            @*<tr>
                    <th class="formTitle"></th>
                    <td class="formValue">
                        <input id="id" name="id" type="text" class="form-control required" placeholder="请录入" />
                    </td>
                    <th class="formTitle"></th>
                    <td class="formValue">
                        <input id="photoable_id" name="photoable_id" type="text" class="form-control required" placeholder="请录入" />
                    </td>
                </tr>*@
            <tr>
                <th class="formTitle">图片</th>
                <td class="formValue">
                    <div style="width:200px;"><img src="" id="path" type="img" style="width:100%;"></div>
                </td>
               
            </tr>
            <tr>
                <th class="formTitle">名称</th>
                <td class="formValue">
                    <input id="name" name="name" type="text" class="form-control " placeholder="请录入" />
                </td>
                <th class="formTitle">标记</th>
                <td class="formValue">
                    <input id="tag" name="tag" type="text" class="form-control " placeholder="请录入" />
                </td>
            </tr>

            <tr>
                <th class="formTitle" style="height: 35px;">选项</th>
                <td class="formValue" colspan="3" style="padding-top: 1px;">

                    <div class="ckbox">
                        <input id="is_cover" name="is_cover" type="checkbox"><label for="is_cover">设为首图</label>
                    </div>
            </tr>

            <tr>
                <th class="formTitle">简介</th>
                <td class="formValue">
                    <input id="intro" name="intro" type="text" class="form-control " placeholder="请录入" />
                </td>
                <th class="formTitle">创建时间</th>
                <td class="formValue"><input class="form-control " id="F_CreatorTime" type="text" name="F_CreatorTime" /></td>
            </tr>
        </table>
    </div>
</form>
